package com.ruoyi.core.util;

import java.util.UUID;

/**
 * @author wanghao 913351190@qq.com
 * @create 2022/10/14 17:05
 */
public class IdUtil {
    public static String simpleUUID() {
        UUID uuid = UUID.randomUUID();
        String str = uuid.toString();
        return str.substring(0, 8) + str.substring(9, 13) + str.substring(14, 18) + str.substring(19, 23) + str.substring(24);
    }

    public static String sequenceId() {
        return String.valueOf(SnowflakeUtil.nextId());
    }

}
